package sixkey.utils;

/**
 * ClassName:ResCodeEnum
 * Package:sixkey.utils
 * Description
 *
 * @Author:@wenxueshi
 * @Create:2023/5/20 - 0:11
 * @Version:v1.0
 */

/**
 * 响应码枚举类
 */
public enum ResCodeEnum {

    SUCCESS(200,"操作成功"),
    FAIL(201,"操作失败"),
    NEED_LOGIN(401,"需要登录后操作"),
    SYSTEM_ERROR(500,"系统错误"),
    USERNAME_EXIST(501, "用户名已存在"),
    PHONENUMBER_EXIST(502, "手机号已存在"),
    EMAIL_EXIST(503, "邮箱已存在"),
    REQUIRE_USERNAME(504, "必需填写用户名"),
    CONTENT_NOT_NULL(506, "评论内容不能为空"),
    FILE_TYPE_ERROR(507, "文件类型错误"),
    USERNAME_NOT_NULL(508, "用户名不能为空"),
    USERID_ERR(513, "ID不合法"),
    NICKNAME_NOT_NULL(509, "昵称不能为空"),
    PASSWORD_NOT_NULL(510, "密码不能为空"),
    EMAIL_NOT_NULL(511, "邮箱不能为空"),
    NICKNAME_EXIST(512, "昵称已存在"),
    LOGIN_ERROR(505, "密码错误"),
    USERIS_DELETED(600,"用户已被删除"),
    NOT_ADMIN(602,"非管理员"),
    NOT_PERMISSION(603,"无权限操作"),
    USERNAME_NOTFOUND(601,"用户名不存在");


    int code;
    String message;

    ResCodeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode(){
        return code;
    }

    public String getMessage(){
        return message;
    }
}
